package gestion.horarios.model.jpa.entities;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the sedeescenario database table.
 * 
 */
@Embeddable
public class SedeEscenarioPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;
	@Column(unique=true, nullable=false)
	private int escenarioId;
	@Column(unique=true, nullable=false)
	private int sedeEscenarioId;

    public SedeEscenarioPK() {
    }

	public int getEscenarioId() {
		return this.escenarioId;
	}
	public void setEscenarioId(int escenarioId) {
		this.escenarioId = escenarioId;
	}

	public int getSedeEscenarioId() {
		return this.sedeEscenarioId;
	}
	public void setSedeEscenarioId(int sedeEscenarioId) {
		this.sedeEscenarioId = sedeEscenarioId;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof SedeEscenarioPK)) {
			return false;
		}
		SedeEscenarioPK castOther = (SedeEscenarioPK)other;
		return 
			(this.escenarioId == castOther.escenarioId)
			&& (this.sedeEscenarioId == castOther.sedeEscenarioId);
    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.escenarioId;
		hash = hash * prime + this.sedeEscenarioId;
		
		return hash;
    }
}